import 'package:custom_widgets/screen_util.dart';

/// 字体大小,间距常量定义(为统一实现适配准备)
class Dimens {
  static double fontSp8 = fontSp(16.0);
  static double fontSp9 = fontSp(18.0);
  static double fontSp10 = fontSp(20.0);
  static double fontSp11 = fontSp(22.0);
  static double fontSp12 = fontSp(24.0);
  static double fontSp13 = fontSp(26.0);
  static double fontSp14 = fontSp(28.0);
  static double fontSp15 = fontSp(30.0);
  static double fontSp16 = fontSp(32.0);
  static double fontSp17 = fontSp(34.0);
  static double fontSp18 = fontSp(36.0);
  static double fontSp20 = fontSp(40.0);
  static double fontSp23 = fontSp(46.0);
  static double fontSp24 = fontSp(48.0);
  static double fontSp25 = fontSp(50.0);
  static double fontSp26 = fontSp(52.0);
  static double fontSp27 = fontSp(54.0);
  static double fontSp28 = fontSp(56.0);
  static double fontSp29 = fontSp(58.0);
  static double fontSp30 = fontSp(60.0);
  static double fontSp32 = fontSp(64.0);
  static double fontSp35 = fontSp(70.0);
  static double fontSp38 = fontSp(76.0);
  static double fontSp40 = fontSp(80.0);

  static double gapDp0_5 = ScreenUtil().setWidth(1.0) as double;
  static double gapDp1 = ScreenUtil().setWidth(2.0) as double;
  static double gapDp2 = ScreenUtil().setWidth(4.0) as double;
  static double gapDp3 = ScreenUtil().setWidth(6.0) as double;
  static double gapDp4 = ScreenUtil().setWidth(8.0) as double;
  static double gapDp5 = ScreenUtil().setWidth(10.0) as double;
  static double gapDp6 = ScreenUtil().setWidth(12.0) as double;
  static double gapDp7 = ScreenUtil().setWidth(14.0) as double;
  static double gapDp8 = ScreenUtil().setWidth(16.0) as double;
  static double gapDp9 = ScreenUtil().setWidth(18.0) as double;
  static double gapDp10 = ScreenUtil().setWidth(20.0) as double;
  static double gapDp11 = ScreenUtil().setWidth(22.0) as double;
  static double gapDp12 = ScreenUtil().setWidth(24.0) as double;
  static double gapDp13 = ScreenUtil().setWidth(26.0) as double;
  static double gapDp14 = ScreenUtil().setWidth(28.0) as double;
  static double gapDp15 = ScreenUtil().setWidth(30.0) as double;
  static double gapDp16 = ScreenUtil().setWidth(32.0) as double;
  static double gapDp17 = ScreenUtil().setWidth(34.0) as double;
  static double gapDp18 = ScreenUtil().setWidth(36.0) as double;
  static double gapDp19 = ScreenUtil().setWidth(38.0) as double;
  static double gapDp20 = ScreenUtil().setWidth(40.0) as double;
  static double gapDp21 = ScreenUtil().setWidth(42.0) as double;
  static double gapDp22 = ScreenUtil().setWidth(44.0) as double;
  static double gapDp23 = ScreenUtil().setWidth(46.0) as double;
  static double gapDp24 = ScreenUtil().setWidth(48.0) as double;
  static double gapDp25 = ScreenUtil().setWidth(50.0) as double;
  static double gapDp30 = ScreenUtil().setWidth(60.0) as double;
  static double gapDp35 = ScreenUtil().setWidth(70.0) as double;
  static double gapDp40 = ScreenUtil().setWidth(80.0) as double;
  static double gapDp45 = ScreenUtil().setWidth(90.0) as double;
  static double gapDp50 = ScreenUtil().setWidth(100.0) as double;

  static double? statusBarHeight = ScreenUtil.statusBarHeight;
  static double? bottomBarHeight = ScreenUtil.bottomBarHeight;

  /// 返回适配字体大小
  ///
  /// [px] 设计图尺寸(单位px), double类型
  static double fontSp(double px) {
    return ScreenUtil().setSp(px, allowFontScalingSelf: true) as double;
  }

  /// 返回适配宽高尺寸
  ///
  /// [px] 设计图尺寸(单位px), double类型
  static double widthDp(double px) {
    return ScreenUtil().setWidth(px) as double;
  }

  /// 返回适配宽高尺寸
  ///
  /// [px] 设计图尺寸(单位px), double类型
  static double widthFactor([double factor = 1.0]) {
    return ScreenUtil.screenWidthDp! * factor;
  }
}
